import {
  ref,
  reactive
} from "vue";

function userRemoveStudent() {
  let state = reactive({
    stus: [{
        id: 1,
        name: "zs",
        age: 10
      },
      {
        id: 2,
        name: "ls",
        age: 20
      },
      {
        id: 3,
        name: "ww",
        age: 30
      }
    ]
  });

  function remstus(index) {
    state.stus = state.stus.filter((item, idx) => index !== idx);
  }
  return {
    state,
    remstus
  };
};
export default userRemoveStudent;